package common;

import javax.swing.JOptionPane;

import GUI.MainGUI;

/**
 *@author Juan Alapin - 324507516
 *@author Giora Yaffe - 036551281
 *@author Shachar Gritzman - 300174026
 *@author Nir Porat - 021515580
*/

/**
 * Show error message.
 * 
 * @param String
 *            of error message.
 */
public class Perror {
	/**
	 * the method displays Error messages on the screen
	 * 
	 * @param error_message
	 *            the error message
	 */
	public static void pError(String error_message) {
		JOptionPane.showMessageDialog(MainGUI.mainframe, "Error: "
				+ error_message);
	}
	/**
	 * the method displays Fatal Error messages on the screen
	 * 
	 * @param error_message
	 *            the error message
	 */
	public static void pFatalError(String error_message) {
		JOptionPane.showMessageDialog(MainGUI.mainframe, "Error: "
				+ error_message);
		System.exit(0);
	}

}
